/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.trade;

import com.enation.app.javashop.client.trade.OrderCenterClient;
import com.enation.app.javashop.core.client.fallback.trade.OrderCenterClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.trade.order.dto.OrderDTO;
import com.enation.app.javashop.model.trade.order.vo.OrderParam;
import com.enation.app.javashop.model.trade.order.vo.TradeParam;
import com.enation.app.javashop.model.trade.order.vo.TradeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(name = "trade-service", fallbackFactory = OrderCenterClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface OrderCenterClientFeignImpl extends OrderCenterClient {


    /**
     * 创建订单
     * @param orderParam
     * @return
     */
    @Override
    @PostMapping("/client/order/create-order")
    OrderDTO createOrderDTO(@RequestBody OrderParam orderParam);

    /**
     * 创建交易对象
     * @param tradeParam
     * @return
     */
    @Override
    @PostMapping("/client/order/create-trade")
    TradeVO createTradeVO(@RequestBody TradeParam tradeParam);

    /**
     * 创建交易
     * @param tradeVO
     */
    @Override
    @PostMapping("/client/order/create")
    void createTrade(@RequestBody TradeVO tradeVO);




}
